Fix r20109, which was kind of insane. It was a wikitext list with only some output...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 4 Mar 2007 15:44:38 +0000 (15:44 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 4 Mar 2007 15:44:38 +0000 (15:44 +0000)
RELEASE-NOTES
includes/Parser.php
includes/SpecialWatchlist.php

index 4e102b7..a1d3e03 100644 (file)
@@ -244,7 +244,8 @@ lighter making things easier to read.
 * (bug 8539) Enable PLURAL option for another message of recentchanges.
 * (bug 8728) MediaWiki:Badfiletype splitted into 3 messages
 * (bug 9131) Be strict with offset values in SpecialContributions for Postgres
-* (bug 8747) Reformat output of removed entries from watchlist
+* (bug 8747) When unwatching pages from Special:Watchlist/edit, put the
+  confirmation messages in a proper list with a CSS class and id.
 * (bug 9155) Allow footer info to wrap in Monobook
 
 == Languages updated ==
index 14d45bd..26e532c 100644 (file)
@@ -4562,7 +4562,7 @@ class Parser
                                .+?  # Section title...
                                \\2  # Ending = count must match start
                                (?:$comment|<\/?noinclude>|[ \\t]+)* # Trailing whitespace ok
-                               $
+                               \n?
                        |
                                <h([1-6])\b.*?>
                                .*?
@@ -4721,7 +4721,7 @@ class OnlyIncludeReplacer {
                if ( substr( $matches[1], -1 ) == "\n" ) {
                        $this->output .= substr( $matches[1], 0, -1 );
                } else {
-                       $this->output .= $matches[1];
+                       $this->output .= $matche        s[1];
                }
        }
 }
index 8d741dd..89047f4 100644 (file)
@@ -85,22 +85,22 @@ function wfSpecialWatchlist( $par ) {
         # Deleting items from watchlist
        if(($action == 'submit') && isset($remove) && is_array($id)) {
                $wgOut->addWikiText( wfMsg( 'removingchecked' ) );
-               $wgOut->addHTML( '<p>' );
+               $wgOut->addHTML( "<ul id=\"mw-unwatch-list\">\n" );
                foreach($id as $one) {
                        $t = Title::newFromURL( $one );
                        if( !is_null( $t ) ) {
                                $wl = WatchedItem::fromUserTitle( $wgUser, $t );
                                if( $wl->removeWatch() === false ) {
-                                       $wgOut->addHTML( wfMsg( 'couldntremove', htmlspecialchars($one) ) . "<br />\n" );
+                                       $wgOut->addHTML( '<li class="mw-unwatch-failure">' . wfMsg( 'couldntremove', htmlspecialchars($one) ) . "</li>\n" );
                                } else {
                                        wfRunHooks('UnwatchArticle', array(&$wgUser, new Article($t)));
-                                       $wgOut->addHTML( '* [[' . htmlspecialchars($one) . ']]<br />' );
+                                       $wgOut->addHTML( '<li class="mw-unwatch-success">[[' . htmlspecialchars($one) . "]]</li>\n" );
                                }
                        } else {
-                               $wgOut->addHTML( wfMsg( 'iteminvalidname', htmlspecialchars($one) ) . "<br />\n" );
+                               $wgOut->addHTML( '<li class="mw-unwatch-invalid">' . wfMsg( 'iteminvalidname', htmlspecialchars($one) ) . "</li>\n" );
                        }
                }
-               $wgOut->addHTML( "</p>\n<p>" . wfMsg( 'wldone' ) . "</p>\n" );
+               $wgOut->addHTML( "</ul>\n<p>" . wfMsg( 'wldone' ) . "</p>\n" );
        }
 
        $dbr = wfGetDB( DB_SLAVE, 'watchlist' );